﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CommunitySystem.PageView
{
    public partial class BianZhi_Emp_JieYongWindow : ChildWindow
    {
        public string Type = "";
        public string Type1 = "";
        public BianZhi_Emp_JieYongWindow(string type)
        {
            InitializeComponent();
            Type1 = type;
            if(type != "借用")
            {
                tbTitle.Text = "查看过渡性超值情况或人员情况";
                zw.Content = "过渡性超值情况";
            }
            else
            {
                tbTitle.Text = "查看职位借用情况或人员情况";
                zw.Content = "职位借用情况";
            }
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(Type))
            {
                SilverlightMessageBoxLibrary.Message.ErrorMessage("请选择要查看的类型！");
                return;
            }
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void OKButton1_Click(object sender, RoutedEventArgs e)
        {
            if (Type1 == "借用")
            {
                Type = "职位借用情况";
            }
            else
            {
                Type = "过渡性超值情况";
            }
        }

        private void OKButton2_Click(object sender, RoutedEventArgs e)
        {
            Type = "人员情况";
        }
    }
}
